//
//  CCTableView.m
//  ccZone
//
//  Created by 陈小娟 on 2017/12/14.
//  Copyright © 2017年 CC. All rights reserved.
//

#import "CCTableView.h"
#import "UITableView+Adapt_iOS11.h"

@implementation CCTableView

-(instancetype)init {
    self = [super init];
    if (self) {
        [self adaptation];
        [self initial];
    }
    return self;
}

-(instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self adaptation];
        [self initial];
    }
    return self;
}

-(void)initial {
    _currentPage = 1;
    _param = [NSMutableDictionary dictionary];
    self.backgroundColor = TY_RGB(242,242,242,1.0);
    [self registerClass:[BaseCell class]
        forCellReuseIdentifier:BaseCellID];
}

-(NSInteger)currentPage {
    if (_currentPage <1) {
        _currentPage = 1;
    }
    return _currentPage;
}

-(void)nextPage {
    _currentPage ++;
}

- (void)dealloc{
    RSDLog(@"---------------------------");
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
